#ifndef _IM_SERVER_MESSAGE_ID_CREATOR_
#define _IM_SERVER_MESSAGE_ID_CREATOR_

#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include "database/simple_db_pool.h"
#include "base/singleton.h"
#include "base/config_reader.h"

namespace imserver {

class MessageIdCreator : public base::Singleton<MessageIdCreator> {
public:

  int64_t createMsgId();
  int64_t createDialogueId();

private:
  friend class base::Singleton<MessageIdCreator>;
  MessageIdCreator() {}

  mutable boost::mutex mutex_;
};

}

#endif // _IM_SERVER_MESSAGE_ID_CREATOR_
